<?php
//----------------------------------------------------------------------------------------------------------
    require_once('../config.inc.php');

    require_once($config['app_dir'] . '/classes/staff.class.php');
    require_once($config['app_dir'] . '/classes/stockplot.data.php');    //get IDParams only
   //-------------------------------------------------------------------------------------------------------
   $IDParam = new objIDParam();
   $id = $IDParam->id;

   $access = ( 0===strpos($id, 'last_sparklines_out__') ) || ( 0===strpos($id, 'nforecast__'))  || ( 0===strpos($id, 'pmail__'));

   $Staff = new objStaff($config['app_id']);
   if( !$access && !$Staff->Login() ) exit;
   //-------------------------------------------------------------------------------------------------------
   header("Content-type: image/gif");
   @readfile($config['jpgraph']['cache_dir'] . $IDParam->id);
//----------------------------------------------------------------------------------------------------------
?>
